﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Wicresoft.EKA.NRemedy
{
    public static class StringExtensions
    {
        /// <summary>
        /// 两边加双引号
        /// </summary>
        /// <param name="a"></param>
        /// <returns></returns>
        public static string D(this string a)
        {
            return " \"" + a + "\" ";
        }

        /// <summary>
        /// 两边加单引号
        /// </summary>
        /// <param name="a"></param>
        /// <returns></returns>
        public static string S(this string a)
        {
            return " \'" + a + "\' ";
        }


        /// <summary>
        /// 两边加双引号 并在左边加百分号
        /// </summary>
        /// <param name="a"></param>
        /// <returns></returns>
        public static string LP(this string a)
        {
            return " \"%" + a + "\" ";
        }

        /// <summary>
        /// 两边加双引号 并在右边加百分号
        /// </summary>
        /// <param name="a"></param>
        /// <returns></returns>
        public static string RP(this string a)
        {
            return " \"" + a + "%\" ";
        }

        /// <summary>
        /// 两边加双引号 并在两边加百分号
        /// </summary>
        /// <param name="a"></param>
        /// <returns></returns>
        public static string AP(this string a)
        {
            return " \"%" + a + "%\" ";
        }
    }
}
